<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>


<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %>
<%
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<base href="<%=basePath%>">
<html>
<head>

 <title>首页</title>
 <style type="text/css">
  #shouye {
   position: absolute;
   height: 800px;
   width: 1700px;
   top: 35px;
   left: 0px;

  }

 </style>
 <link type="text/css" rel="stylesheet" href="css/style.css"/>
 <link type="text/css" rel="stylesheet" href="css/index.css"/>
 <script src="js/jquery.min.js"></script>
 <!-- 动态菜单JS -->
 <script type="text/javascript" src="js/menu.js"></script>
</head>

<c:if test="${sessionScope.err=='错误'}">
 <script type="text/javascript" language="JavaScript">

  alert("您的账号或密码输入错误,请重新输入")


  window.location.href = "login.jsp"
 </script>
</c:if>


<body>
<div class="container">
 <div class="cont-top">
  <div class="companyname">健康管理系统</div>
  <div class="cont-top-middle">
   <ul>
    <li id="gouwu">
     <a href="BuyServlet?act=buy_Menu">
      <div class="top-middle">
       <img src="img/icon.png">
      </div>
      <div class="top-txt">购物单</div>
     </a>
    </li>

    <li id="ruku">
     <a href="BuyServlet?act=caiwu">
      <div class="top-middle">
       <img src="img/icon1.png">
      </div>
      <div class="top-txt">财务入库</div>
     </a>
    </li>

    <li>
     <a href="#">
      <div class="top-middle">
       <img src="img/icon1.png">
      </div>
      <div class="top-txt">收款单</div>
     </a>
    </li>

    <li>
     <a href="#">
      <div class="top-middle">
       <img src="img/icon1.png">
      </div>
      <div class="top-txt">收款单</div>
     </a>
    </li>

    <li>
     <a href="#">
      <div class="top-middle">
       <img src="img/icon1.png">
      </div>
      <div class="top-txt">收款单</div>
     </a>
    </li>

    <li>
     <a href="#">
      <div class="top-middle">
       <img src="img/icon1.png">
      </div>
      <div class="top-txt">收款单</div>
     </a>
    </li>

   </ul>
  </div>
  <div class="cont-top-rg">
   <ul class="advanced-menu">
    <li>
     <div class="top-search">
      <div class="t-s-l">
       <span class="left-line"></span>
       <input type="text" value="搜库存" class="search-type" disabled>
       <span class="triangle-bottom"></span>
      </div>
      <div class="t-s-l">
       <input type="text" placeholder="请输入商品编码或名称" class="search-dt" autocomplete="off">
       <span class="right-line"></span>
       <span class="right-icon"><img src="img/search-icon.png"></span>
      </div>
     </div>
    </li>
    <li class="default" style="position:relative;">
     <span class="user"><img src="img/user.png"></span>
<%--     ${user.userName}--%>
     <a class="special" onclick="denglu()"> <i><img src="img/xl.png"></i></a>
     <div class="drop-down-wrap" style="width:180px;left:15px;display: none;">
      <div class="drop-down">
       <span class="triangle-border"></span>
       <span class="triangle-bg"></span>
       <ul class="del-ul">
        <li><a href="#" class="hot"></a></li>
        <li><a href="#"></a></li>
        <li><a href="#">操作日志</a></li>
       </ul>
      </div>
     </div>
    </li>
   </ul>
   <ul class="advanced-menu">
    <li id="p" style="display: none;" ></li>
    <li>
     <a href="#"><img src="img/top-icon2.png"></a>
    </li>
    <li>
     <a href="#"><img src="img/top-icon3.png"></a>
    </li>
    <li>
     <a href="#"><img src="img/top-icon4.png"></a>
    </li>
    <li>
     <a href="#"><img src="img/top-icon5.png"></a>
    </li>
   </ul>
  </div>
 </div>
 <div class="left-menu" style="height:949px;">
  <div class="menu-list">
   <ul>
    <%--                menuNameOne menuPathList--%>
    <c:forEach var="menuNameOne" items="${menuNameOne}">
     <li class="menu-list-01">

      <p class="fumenu">${menuNameOne.menuNameOne}</p>
      <img class="xiala" src="img/xiala.png"/>

      <div class="list-p">
       <c:forEach var="menuPathList" items="${menuPathList}">
        <c:if test="${menuNameOne.menuNameOne==menuPathList.menuNameOne}">

         <a href="${menuPathList.menu.menuPath}" id="href">
          <p class="zcd" id="zcd5">${menuPathList.menu.menuNametwo}</p>
         </a>
        </c:if>
       </c:forEach>
      </div>
     </li>
    </c:forEach>
   </ul>


  </div>
 </div>
 <div class="right-menu">
  <div class="main-hd">
   <div class="page-teb" style="height:887px;">


    <div class="l-tab-links">
     <ul style="left:0;">
      <li class="l-select">
       <a href="index.jsp" style="padding:0 25px;">首页</a>
      </li>
     </ul>
    </div>


    <p>1</p>
    <p>2</p>
    <p>3</p>

    <iframe scrolling="yes" id="shouye" src="http://health.ifeng.com/disease/news/list_0/0.shtml">
    </iframe>


   </div>
  </div>
 </div>
</div>
</body>


<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script>


 // for (var  i=0;i<=$("p").length;i++){
 //  if($("p").eq(i).text()=="开单"){
 //
 //   $("p").eq(i).remove()
 //  }
 //
 //

 // }


 <%-- <c:forEach var="p" items="${list}">--%>






 <%-- </c:forEach>--%>


 function denglu() {

  var bl = confirm('确认重新登陆吗')

  if (bl == true) {
   window.location.href = "login.jsp";
  }


 }

 var a = document.getElementById("p").innerHTML


 if (a == "B") {
  document.getElementById("href").href = "BuyServlet?act=kufang2";
  document.getElementById("gouwu").style.display = "none";
  document.getElementById("ruku").style.display = "none";
 }




</script>
</html>